Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle null y0 values on y log scale rendering #413

Merged
merged 6 commits into from
Oct 10, 2019

Conversation

markov00
Copy link
Member

Summary

The y0 value of each bar is null by default if we don't have a y0 value. With a log scale we were not check for that null value, creating an invalid height value for the bars. The same happens with other scale type.

The issue (two bars should be displayed):
Screenshot 2019-10-10 at 15 38 50

The fix:
Screenshot 2019-10-10 at 15 38 46

I've also fixed a small issue in a story with a wrong data set

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • [ ] This was checked for cross-browser compatibility, including a check against IE11
  • [ ] Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios
  • Each commit follows the convention

@codecov-io
Copy link

codecov-io commented Oct 10, 2019

Codecov Report

Merging #413 into master will decrease coverage by 0.09%.
The diff coverage is 78.94%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #413     +/-   ##
=========================================
- Coverage   97.95%   97.85%   -0.1%     
=========================================
  Files          39       39             
  Lines        2888     2894      +6     
  Branches      693      700      +7     
=========================================
+ Hits         2829     2832      +3     
- Misses         52       55      +3     
  Partials        7        7
Impacted Files Coverage Δ
src/utils/scales/scales.ts 100% <ø> (ø) ⬆️
src/chart_types/xy_chart/rendering/rendering.ts 96.44% <78.94%> (-1.71%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d37b4aa...1fc26a9. Read the comment docs.

@markov00 markov00 requested a review from nickofthyme October 10, 2019 14:00
@markov00 markov00 changed the title Fix log scale rendering fix: handle null y0 values on y log scale rendering Oct 10, 2019
Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good catch with that weird looking chart.

@markov00 markov00 changed the title fix: handle null y0 values on y log scale rendering fix: handle zero y0 values on y log scale rendering Oct 10, 2019
@markov00 markov00 changed the title fix: handle zero y0 values on y log scale rendering fix: handle null y0 values on y log scale rendering Oct 10, 2019
@markov00 markov00 merged commit 5731c10 into elastic:master Oct 10, 2019
markov00 pushed a commit that referenced this pull request Oct 10, 2019
## [13.5.2](v13.5.1...v13.5.2) (2019-10-10)

### Bug Fixes

* handle null y0 values on y log scale rendering ([#413](#413)) ([5731c10](5731c10))
@markov00
Copy link
Member Author

🎉 This PR is included in version 13.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Oct 10, 2019
@markov00 markov00 deleted the fix-log-rendering branch November 25, 2020 11:44
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
## [13.5.2](elastic/elastic-charts@v13.5.1...v13.5.2) (2019-10-10)

### Bug Fixes

* handle null y0 values on y log scale rendering ([opensearch-project#413](elastic/elastic-charts#413)) ([e20e9eb](elastic/elastic-charts@e20e9eb))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants